Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow convention for naming catalogers #2277

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Follow convention for naming catalogers #2277

merged 2 commits into from
Nov 2, 2023

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Oct 31, 2023

This PR introduces a light set of conventions for cataloger names and renames the existing catalogers to follow this convention. Renames include changes to the cataloger.Name(), constructors, and containing go package names.

The following cataloger names were changed:

alpmdb-cataloger		->	alpm-db-cataloger
apkdb-cataloger			->	apk-db-cataloger
dartlang-lock-cataloger		->	dart-pubspec-lock-cataloger
dpkgdb-cataloger		->	dpkg-db-cataloger
go-mod-file-cataloger		->	go-module-file-cataloger
java-cataloger			->	java-archive-cataloger
python-index-cataloger		->	python-package-cataloger
python-package-cataloger	->	python-installed-package-cataloger
rpm-file-cataloger		->	rpm-archive-cataloger
ruby-gemspec-cataloger		->	ruby-installed-gemspec-cataloger
rpm-cataloger			->	rpm-db-cataloger
spm-cataloger			->	swift-package-manager-cataloger

The following go packages within syft/pkg/catalogers were changed, mainly to encapsulate linux distros instead of their tooling:

apk	->	alpine
alpm	->	arch
deb	->	debian
rpm 	->	redhat

Constructors were augmented such that if it started (or nearly started) with the same word as the package name the prefix was removed (avoiding "package stutter", e.g. rpm.NewRPMArchiveCataloger() -> rpm.NewArchiveCataloger()).

Closes #1578

@wagoodman wagoodman force-pushed the rename-catalogers branch 2 times, most recently from e978ed9 to 38f8d05 Compare October 31, 2023 19:13
@wagoodman wagoodman marked this pull request as ready for review October 31, 2023 19:20
@wagoodman wagoodman requested a review from a team October 31, 2023 19:21
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
DEVELOPING.md Outdated Show resolved Hide resolved
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman enabled auto-merge (squash) November 2, 2023 12:24
@wagoodman wagoodman merged commit b2f4d7e into main Nov 2, 2023
10 checks passed
@wagoodman wagoodman deleted the rename-catalogers branch November 2, 2023 12:39
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* follow convention for naming catalogers

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix cataloger name example

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce cataloger naming conventions
2 participants